<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>管理选项</title>
    <!-- Bootstrap -->
    <link href="../assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="fonts/iconfont.css" rel="stylesheet">
    <link href="../assets/css/style.css" rel="stylesheet" />
    <link href="../assets/css/motai.css" rel="stylesheet" />
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
		      <script src="../assets/js/html5shiv.min.js"></script>
		      <script src="../assets/js/respond.min.js"></script>
		      <![endif]-->
  </head>

  <body>
    <!--内容区域-->
    <div class="content">
      <div class="content-header col-md-12">
        <div class="con-header">
          <div class="col-md-6 col-sm-6 col-xs-6">
            <button type="button" class="btn btn-info btn-header" data-toggle="modal" data-target="#myModal">添加+</button>
          </div>
        </div>
      </div>

    </div>

    <!-- 模态框（Modal） -->

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content height-550">
          <!-- 管理选项 -->
          <div class="modal-header">
            <div class="zuo-close" data-dismiss="modal">
              <i class="iconfont icon-o1"></i>
            </div>
            <h5 class="modal-title" id="myModalLabel"><i class="iconfont icon-xiaoxi"></i>&nbsp;管理选项</h5>
          </div>
          <div class="modal-body height440">
                <div class="daili-list">
                  <div class="col-sm-12"><span class="shubiao"></span>合作伙伴</div>
                  <div class="merchant">
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili glxx-agqx">
                                                          最高权限
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili daili-xx">
                                                          代理1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili daili-xx">
                                                          代理1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili daili-xx">
                                                          代理1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili daili-xx">
                                                          代理1
                      </div>            
                    </div>
                  </div>
                </div>
                <div class="clear" style="clear:both"></div>
                <div class="shangjia-list hidden mt20">
                  <div class="col-sm-12"><span class="shubiao"></span>商家</div>
                  <div class="merchant">
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili shangjia-xx">
                                                          农家菜1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili shangjia-xx">
                                                          农家菜1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili shangjia-xx">
                                                          农家菜1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili shangjia-xx">
                                                          农家菜1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili shangjia-xx">
                                                          农家菜1
                      </div>            
                    </div>
                  </div>
                </div>
                <div class="clear" style="clear:both"></div>
                <div class="mendian-list hidden mt20">
                  <div class="col-sm-12"><span class="shubiao"></span>门店</div>
                  <div class="merchant">
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili mendian-xx">
                                                          mendian1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili mendian-xx">
                                                          mendian1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili mendian-xx">
                                                          农家菜1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili mendian-xx">
                                                          农家菜1
                      </div>            
                    </div>
                    <div class="col-sm-3 col-xs-6">
                      <div class="div_daili mendian-xx">
                                                          农家菜1
                      </div>            
                    </div>
                  </div>
                </div>
          </div>
          <div class="modal-footer guanli_foot">
            <button type="button" class="btn save">保存</button>
            <button type="button" class="btn  close_motai" data-dismiss="modal">关闭</button>
          </div>
        </div>
        <!-- /.modal-content -->
      </div>
      <!-- /.modal -->
    </div>

    <script src="../assets/js/jquery.min.js"></script>
    <script src="../assets/js/bootstrap.min.js"></script>
    <script src="../assets/js/main.js"></script>
    <script type="text/javascript">
      $('.daili-xx').on('click',function(){
        $(this).addClass('bg-color');
        $(this).parent().siblings().children('.daili-xx').removeClass('bg-color');
        $(this).parent().parent().parent().siblings('.shangjia-list').removeClass('hidden')
        if($(this).parent().parent().parent().siblings('.mendian-list').hasClass('hidden')){
          // no dothing
        }else{
          $(this).parent().parent().parent().siblings('.shangjia-list').children().children().children('.shangjia-xx').removeClass('bg-color')
          $(this).parent().parent().parent().siblings('.mendian-list').addClass('hidden')
        }
      })
      $('.shangjia-xx').on('click',function(){
        $(this).addClass('bg-color')
         $(this).parent().siblings().children('.shangjia-xx').removeClass('bg-color');
        $(this).siblings().removeClass('guanlist');
        $(this).parent().parent().parent().siblings('.mendian-list').removeClass('hidden')
      })
    </script>

  </body>

</html>